pub fn convert_base(num_str: &str, to_base: u32) -> String {
    let _conver_start = num_str.find('(').unwrap()+1;
    let _conver_end = num_str.find(')').unwrap();
    let c = num_str.get(_conver_start.._conver_end).unwrap();
    let cn = c.parse::<i8>().unwrap();
    let num = String::from(num_str.get(0.._conver_start-1).unwrap());
    let mut num_vec:Vec<u8> = vec![];
    for it in num.chars(){
        let mut m:i8 = 0;
        if it == 'F'{
            m = 15;
        }else if it == 'E'{
            m = 14;
        }else if it == 'D'{
            m = 13;
        }else if it == 'C'{
            m = 12;
        }else if it == 'B'{
            m = 11;
        }else if it == 'A'{
            m = 10;
        }else { m = it.to_string().parse::<i8>().unwrap();}
        num_vec.push(m as u8);
    }
    let mut p = num_vec.len();
    let mut sum:i32 = 0;
    for item in num_vec{
        sum += item as i32 * cn.pow((p - 1) as u32)  as i32;
        p -= 1;
    }
    let mut result = String::new();
    while sum > 0 {
        let remainder = sum % to_base as i32;
        let digit = if remainder < 10 {
            (b'0' + remainder as u8) as char
        } else {
            (b'A' + (remainder - 10) as u8) as char
        };
        result.push(digit);
        sum /= to_base as i32;
    }
    result.to_lowercase().chars().rev().collect()
}

